package cn.leedsoft.and.crimeintent.controller.run_tracker;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.amap.api.maps.AMap;
import com.amap.api.maps.SupportMapFragment;

/**
 * Created by leeds on 2016/9/7 20:26.
 */
public class RunMapFragment extends SupportMapFragment {
    private static final String TAG = "RunMapFragment";
    private AMap mAMap;
    private long mRunId;
    public static final String ARG_RUN_ID = "ARG_RUN_ID";

    public static RunMapFragment newInstance(long runId) {
        Bundle args = new Bundle();
        args.putLong(ARG_RUN_ID, runId);

        RunMapFragment fragment = new RunMapFragment();
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

        mAMap = getMap();
//        mAMap.setTrafficEnabled(true);
//        mAMap.setMyLocationEnabled(true);
        mAMap.setMapType(AMap.MAP_TYPE_SATELLITE);
        mRunId = getArguments().getLong(ARG_RUN_ID);
        View view = super.onCreateView(inflater, container, savedInstanceState);
        System.out.println(">>>>>>>>>>" + (getMap().getMapType() == mAMap.MAP_TYPE_SATELLITE));
        return view;
    }


}
